﻿using PLC.Domain.Dto;
using PLC.Domain.Enum;
using PLC.Domain.Models;

namespace PLC.Domain.ScheduledTasks.Strategy.Trigger;

public class NoActionStrategy:BaseTrigger
{
    public override EnumTrigger EnumTrigger { get; protected set; } = EnumTrigger.采集数据;
    public override int TriggerEvent(PLCConfig plcConfig, DtoDataConfig trigger, PLCReadModel plcReadModel)
    {
        if (plcReadModel.TriggerValue=="1")
        {
            return (int)EnumWriteType.等待;
        }
        return (int)EnumWriteType.OK;
    }
}